<template>
	<view class="aritlce-detail">
		<view class="detail-t">
			<image :src="articleDetail.coverImg" mode=""></image>
			<view class="collect"><image src="../../../static/image/icons/collect.png" mode=""></image></view>
		</view>
		<view class="detail-c">
			<view class="title">
				<view class="cname">{{ articleDetail.title }}</view>
				<view class="ename"></view>
			</view>
			<view class="info">
				<view class="color">
					<view class="c1" :style="{ 'background-color': articleDetail.color1 }"></view>
					<view class="c1" :style="{ 'background-color': articleDetail.color2 }"></view>
					<view class="c1" :style="{ 'background-color': articleDetail.color3 }"></view>
				</view>
				<view class="price">
					￥{{articleDetail.price}}
				</view>
			</view>
			<view class="desc" v-html="articleDetail.content2">
				
			</view>
			
		</view>
		<view class="detail-b">
			<image :src="articleDetail.coverImg" mode=""></image>
			<view class="redu">
				<text>1028</text>
				<image src="../../../static/image/icons/chat.png" mode=""></image>
				<text>458</text>
				<image src="../../../static/image/icons/collect.png" mode=""></image>
				<text>781</text>
				<image src="../../../static/image/icons/zan.png" mode=""></image>
			</view>
		</view>
	</view>
</template>

<script>
import { articleDetail } from '../../../utils/find/articleDetail/index.js';
export default {
	data() {
		return {
			id: '',
			articleDetail: {}
		};
	},
	methods: {
		async getArticleDetail() {
			let data = await articleDetail({
				id: this.id
			});
			console.log(data);
			this.articleDetail = data.data.data;
		}
	},
	onLoad(option) {
		// console.log(option);
		this.id = option.id;
		this.getArticleDetail();
	}
};
</script>

<style lang="scss" scoped>
.aritlce-detail {
	width: 100%;
	padding: 0 0 50rpx 0;
	.detail-t {
		position: relative;
		height: 546rpx;
		image {
			width: 100%;
			height: 100%;
			border-radius: 0 0 0 200rpx;
		}
		.collect {
			position: absolute;
			right: 96rpx;
			bottom: -50rpx;
			width: 100rpx;
			height: 100rpx;
			border-radius: 50%;
			background-color: #354e44;
			display: flex;
			justify-content: center;
			align-items: center;
			z-index: 10;
			image {
				width: 48rpx;
				height: 42rpx;
			}
		}
	}
	.detail-c {
		margin-top: 84rpx;
		box-sizing: border-box;
		padding: 0 76rpx 0 78rpx;
		width: 100%;
		.title {
			.cname {
				font-size: 36.4rpx;
				color: #3E3E3E;
				letter-spacing: 2.6rpx;
				font-weight: bolder;
			}
			.ename {
				font-size: 30.8rpx;
				color: #B0B0B0;
				letter-spacing: 2.2rpx;
				
			}
		}
		.info {
			width: 100%;
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-top: 17rpx;
			.color {
				display: flex;
				.c1 {
					width: 28rpx;
					height: 28rpx;
					border-radius: 50%;
					margin-right: 10rpx;
				}
			}
			.price {
				font-size: 36.4rpx;
				color: #3E3E3E;
				letter-spacing: 2.6rpx;
				font-weight: bolder;
			}
		}
		.desc {
			margin-top: 75rpx;
			font-size: 28rpx;
			color: #8A8A8A;
			letter-spacing: 2rpx;
		}
	}
	.detail-b {
		margin-top: 56rpx;
		width: 100%;
		image {
			width: 100%;
			height: 402rpx;
		}
		.redu {
			margin-top: 108rpx;
			margin-left: 262rpx;
			margin-right: 42rpx;
			display: flex;
			image {
				width: 44rpx;
				height: 40rpx;
				margin-left: 18rpx;
			}
			text {
				&:first-child {
					margin-left: 0;
				}
				margin-left: 40rpx;
				font-size: 28rpx;
				font-weight: bolder;
				color: #3E3E3E;
				letter-spacing: 2rpx;
			}
		}
	}
}
</style>
